package cn.it62.pojo;

import java.util.Scanner;

/**
 * @author zhenhuaShen
 * @version 1.0
 * @date 2019/7/24
 * @description cn.it62.pojo
 */
public class User {
    public String userName = "admin";
    public String passWord = "000000";


    public void updatePassword() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入用户名：");
        String userName1 = sc.next();

        System.out.println("请输入密码：");
        String passWord1 = sc.next();
        if (userName1.equals(userName) && passWord1.equals(passWord)){
            System.out.println("输入新密码");
        passWord = sc.next();
        System.out.println("修改成功");

    }else

    {
        System.out.println("用户名或密码不正确");
    }

  }
}
